ref(night-shift): Use seer-project-settings helpers for project eligibility#112936
ref(night-shift): Use seer-project-settings helpers for project eligibility#112936
Conversation
d01fd09 to
e704614
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit e704614. Configure here.
Backend Test FailuresFailures on
|
e704614 to
8b8fe1d
Compare
8b8fe1d to
a226560
Compare
Backend Test FailuresFailures on
|
a226560 to
99c5a91
Compare
99c5a91 to
b0f533f
Compare
Backend Test FailuresFailures on
|
b0f533f to
cade023
Compare
…bility Replace direct SeerProjectRepository queries in _get_eligible_projects with bulk_read_preferences_from_sentry_db / bulk_get_project_preferences behind the seer-project-settings-read-from-sentry feature flag, matching the pattern used in context_engine_index and autofix. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Agent transcript: https://claudescope.sentry.dev/share/TusCoPLrgCYHLxdSUeDTGIDPYU1f6BITAaO7rK6QDl0
cade023 to
63d1544
Compare
There was a problem hiding this comment.
Helper looks good, thanks for writing this!
Only one nit, which is adding the tuning to SeerProjectPreference--Seer will drop the field when it gets included in writes, and the write preference helpers to Sentry DB won't write it either. Mind adding a clarifying comment to the write helpers? Or alternatively could just return tuples

Add a unified `bulk_read_preferences()` helper in `autofix/utils.py` that
returns `dict[int, SeerProjectPreference | None]` regardless of whether
preferences are read from Sentry DB or the Seer API. The helper checks the
`seer-project-settings-read-from-sentry` feature flag internally so callers
don't need to duplicate that branching logic.
Use the new helper in the night-shift cron's `_get_eligible_projects`,
replacing the direct `SeerProjectRepository` query. The
`autofix_automation_tuning != OFF` filter is preserved on top of the
preference check.